package com.ymm.controller;

import com.ymm.domain.vo.ResponseResult;
import com.ymm.service.EmailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 椰咩咩咩
 * @version 1.0-SNAPSHOT
 * @date 2023/1/31 20:12
 * @Description
 */
@RestController
@RequestMapping("/ymm")
public class EmailController {

    @Autowired
    private EmailService emailService;

    @GetMapping("/code")
    public ResponseResult sendCkCode(@RequestParam(required = false) String address) {
        return emailService.sendCkCode(address);
    }
}
